package com.example.footballsystem.service;

import com.example.footballsystem.entity.TeamGame;
import com.example.footballsystem.entity.TeamPerson;
import com.example.footballsystem.mapper.TeamPersonMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Slf4j
@Service
public class TeamPersonService {
    @Autowired
    TeamPersonMapper teamPersonMapper;
    public Boolean addTeamPerson(TeamPerson TeamPerson){
        return teamPersonMapper.addTeamPerson(TeamPerson);
    }
    public Boolean deleteTeamPerson(TeamPerson TeamPerson){
        return teamPersonMapper.deleteTeamPerson(TeamPerson.getTeamID(),TeamPerson.getPersonName());
    }
    public List<TeamPerson> getAllTeamPerson(){
        return teamPersonMapper.getAllTeamPerson();
    }
    public List<TeamPerson> getTeamPersonByTeamID(int teamID){
        return teamPersonMapper.getTeamPersonByTeamID(teamID);
    }
}
